org.eclipse.vtp.framework.engine.runtime
Class Configurable

java.lang.Object
  extended by org.eclipse.vtp.framework.engine.runtime.Component
      extended by org.eclipse.vtp.framework.engine.runtime.Configurable
Direct Known Subclasses:
Executable, Service

public abstract class Configurable
extends Component

Base class for components that accept configuration data.

Author:
Lonnie Pryor

Field Summary
 
Fields inherited from class org.eclipse.vtp.framework.engine.runtime.Component
blueprint, constructors, mutators
 
Constructor Summary
protected Configurable(Blueprint blueprint, java.lang.Class type, org.w3c.dom.Element[] elements)
          Creates a new Configurable.
 
Method Summary
protected  Builder createBuilder(Scope scope)
          Creates a builder of this component for the specified scope.
protected abstract  IContext createServiceRegistry(Scope scope)
          Creates a service registry for the specified scope.
protected  java.lang.Object[] lookupAllConfigurations(java.lang.String identifier, IContext serviceRegistry)
          Returns all the configuration objects in the supplied scope with the specified identifier.
protected  java.lang.Object lookupConfiguration(java.lang.String identifier, IContext serviceRegistry)
          Looks up a single configuration object in the supplied scope with the specified identifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configurable

protected Configurable(Blueprint blueprint,
                       java.lang.Class type,
                       org.w3c.dom.Element[] elements)
                throws java.lang.NullPointerException
Creates a new Configurable.

Parameters:
blueprint - The blueprint of the process.
type - The type of the configurable component.
elements - The configuration data or null for no configuration data.
Throws:
java.lang.NullPointerException - If the supplied blueprint is null.
java.lang.NullPointerException - If the supplied type is null.
Method Detail

lookupConfiguration

protected java.lang.Object lookupConfiguration(java.lang.String identifier,
                                               IContext serviceRegistry)
Looks up a single configuration object in the supplied scope with the specified identifier.

Parameters:
identifier - The identifier of the configuration object to return.
serviceRegistry - The service registry that is bound to the configurable component.
Returns:
A single configuration object or null if one is not found.

lookupAllConfigurations

protected java.lang.Object[] lookupAllConfigurations(java.lang.String identifier,
                                                     IContext serviceRegistry)
Returns all the configuration objects in the supplied scope with the specified identifier.

Parameters:
identifier - The identifier of the configuration objects to return.
serviceRegistry - The service registry that is bound to the configurable component.
Returns:
All the configuration objects or null if none are found.

createBuilder

protected Builder createBuilder(Scope scope)
Creates a builder of this component for the specified scope.

Parameters:
scope - The scope of the instance to create.
Returns:
A new builder of this component for the specified scope.

createServiceRegistry

protected abstract IContext createServiceRegistry(Scope scope)
Creates a service registry for the specified scope.

Parameters:
scope - The scope to create the registry for.
Returns:
A new service registry for the specified scope.